package com.bm.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bm.common.util.Rutils;
import com.bm.common.vo.R;
import com.bm.server.dao.ActivityDao;
import com.bm.server.entity.Activity;
import com.bm.server.entity.UserInfo;
import com.bm.server.service.intf.ActivityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ActivityServiceImpl implements ActivityService {
    @Resource
    private ActivityDao dao;
    @Override
    public R all() {
        
        return Rutils.ok(dao.all());
    }

    @Override
    public R one(int id) {
        QueryWrapper<Activity> wrapper = new QueryWrapper<>();
        wrapper.eq("id",id);
        return Rutils.ok(dao.selectOne(wrapper));
    }

}

